package com.sand.result;

import lombok.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class PageResult<T> {

    private Integer total;

    private Integer code;

    private T data;

    private String msg;

    public PageResult<T> ok(T data , Integer leg){
        this.code = 200;
        this.data = data;
        this.total = leg;
        this.msg = "查询成功";
        return this;
    }

}
